package com.mdhw.controller;


import com.mdhw.ali.service.AliService;
import com.mdhw.common.annotation.IgnorePermissions;
import com.mdhw.config.R;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Api(tags = "阿里相关接口")
@RequestMapping("ali")
public class AliController {

    @Autowired
    private AliService aliService;


    @IgnorePermissions
    @GetMapping("/get/selectUserPhone")
    public R<String> selectUserPhone(@RequestParam String response,@RequestParam String sign){
        try {
            String phone = this.aliService.jiemiPhone(response, sign);
            return R.success(phone);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
